/****************** Binary Search Tree *************************\
Author : Liwen Chu
Email : hiensjtu@gmail.com
Comment: Feel free to use any part of this file, however, keeping
of the author infomation would be appreciated.
\***************************************************************/

//A class to impelement heap sort on an array
//
class HeapSort{

private:
	//Max heapify the sub heap rooted at node[i]
	static void MaxHeapify(int nList[] , int nLength, int i);
	static void BuildMaxHeap(int nList[] , int nHeapSize);

public:
	//Sort the input array
	static void Sort(int nList[], int nLength);
};
